Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow same named types and functions #839

Merged
merged 2 commits into from
Jan 26, 2023
Merged

Allow same named types and functions #839

merged 2 commits into from
Jan 26, 2023

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Jan 26, 2023

What

Change the names of the static variables that contain the spec XDR to include a type or function qualifier for the kind of entry the spec contains.

Why

To allow same named types and functions in contracts. When a type and function have the same name today they result in two static variables that have the same names. Adding a qualifier to what they are to those variables names will stop them from colliding.

Close #828

@leighmcculloch leighmcculloch marked this pull request as ready for review January 26, 2023 00:03
Copy link
Contributor

@sisuresh sisuresh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@leighmcculloch leighmcculloch merged commit db018aa into main Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot have a contract with a type and method of the same name
2 participants